<script setup>
import { inject } from 'vue';
import Grandson from './Grandson.vue';

const money = inject('money')
const add = inject('add')
</script>

<template>
    <h1>子组件 - {{ money }}</h1>
    <button @click="add(2000)">点我加工资</button>

    <Grandson></Grandson>
</template>
